package com.ruoyi.purchase.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.core.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public class PurchaseOrder extends BaseEntity {
    private String isPurchase;
    private String beginTime;
    private String endTime;
    /**
     * 采购订单管理主键
     */
    private Long purchaseId;
    /**
     * 订单日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date purchaseDate;
    /**
     * 订单编号
     */
    private String purchaseNum;
    /**
     * 公司主键
     */
    private Long supplierId;
    /**
     * 供应商主键
     */
    private Long deptId;
    /**
     * 供应商名称
     */
    private String deptName;
    /**
     * 业务员主键
     */
    private Long userId;
    /**
     * 业务员主键
     */
    private String userName;
    /**
     * 订单金额
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal purchaseAmount;
    /**
     * 订单金额(含税)
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal taxAmount;
    /**
     * 付款方式
     */
    private String payMethod;
    /**
     * 订单状态
     */
    private String purchaseStatus;
    /**
     * 订单状态
     */
    private String purchaseFlag;
    /**
     * 开票类型
     */
    private String billType;
    /**
     * 订单备注
     */
    private String purchaseRemark;
    /**
     * 税率
     */
    private String taxRate;
    /**
     * 是否已生成销售订单字段 默认为0
     */
    private int isCreateSale;
    /**
     * 存储的pdf地址
     */
    private String pdfUrl;
    /**
     * 订单创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date createTime;
    /**
     * 订单审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date auditTime;
    /**
     * 子集
     */

    private List<PurchaseModel> purchaseModel;

    public String getIsPurchase() {
        return isPurchase;
    }

    public void setIsPurchase(String isPurchase) {
        this.isPurchase = isPurchase;
    }

    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getPdfUrl() {
        return pdfUrl;
    }

    public void setPdfUrl(String pdfUrl) {
        this.pdfUrl = pdfUrl;
    }

    public String getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(String taxRate) {
        this.taxRate = taxRate;
    }

    public Long getPurchaseId() {
        return purchaseId;
    }

    public void setPurchaseId(Long purchaseId) {
        this.purchaseId = purchaseId;
    }

    public Date getPurchaseDate() {
        return purchaseDate;
    }

    public void setPurchaseDate(Date purchaseDate) {
        this.purchaseDate = purchaseDate;
    }

    public String getPurchaseNum() {
        return purchaseNum;
    }

    public void setPurchaseNum(String purchaseNum) {
        this.purchaseNum = purchaseNum;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public BigDecimal getPurchaseAmount() {
        return purchaseAmount;
    }

    public void setPurchaseAmount(BigDecimal purchaseAmount) {
        this.purchaseAmount = purchaseAmount;
    }

    public BigDecimal getTaxAmount() {
        return taxAmount;
    }

    public void setTaxAmount(BigDecimal taxAmount) {
        this.taxAmount = taxAmount;
    }

    public String getPayMethod() {
        return payMethod;
    }

    public void setPayMethod(String payMethod) {
        this.payMethod = payMethod;
    }

    public String getPurchaseStatus() {
        return purchaseStatus;
    }

    public void setPurchaseStatus(String purchaseStatus) {
        this.purchaseStatus = purchaseStatus;
    }

    public String getPurchaseFlag() {
        return purchaseFlag;
    }

    public void setPurchaseFlag(String purchaseFlag) {
        this.purchaseFlag = purchaseFlag;
    }

    public String getBillType() {
        return billType;
    }

    public void setBillType(String billType) {
        this.billType = billType;
    }

    public String getPurchaseRemark() {
        return purchaseRemark;
    }

    public void setPurchaseRemark(String purchaseRemark) {
        this.purchaseRemark = purchaseRemark;
    }

    public int getIsCreateSale() {
        return isCreateSale;
    }

    public void setIsCreateSale(int isCreateSale) {
        this.isCreateSale = isCreateSale;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getAuditTime() {
        return auditTime;
    }

    public void setAuditTime(Date auditTime) {
        this.auditTime = auditTime;
    }

    public List<PurchaseModel> getPurchaseModel() {
        return purchaseModel;
    }

    public void setPurchaseModel(List<PurchaseModel> purchaseModel) {
        this.purchaseModel = purchaseModel;
    }
}
